import React from 'react';
import Loader from 'components/Loader'
export default ({isLoading, error}) => {  // Handle the loading state
    if (isLoading) {    
        return  <Loader fullScreen spinning={isLoading} />;
    }  // Handle the error state
    else if (error) {    
        return <div>Sorry, there was a problem loading the page.</div>;
    }  else
     {  
        return null;
     }
};